<%--
  Created by IntelliJ IDEA.
  User: lutao
  Date: 2017/7/19
  Time: 17:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/include-core.jsp" %>
    <%@ include file="/common/jspTemplate.jsp" %>

    <title>产品类型列表</title>

</head>
<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 产品管理 <span
        class="c-gray en">&gt;</span> 产品类型管理 <a class="btn btn-success radius r"
                                                style="line-height:1.6em;margin-top:3px"
                                                href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
        <div class="text-c">
            <form action="/productType/getProductTypeList" method="post" id="searchForm">
                <input type="hidden" id="count" value="${pageInfo.total }" />
                <input type="hidden" id="page" name="page" value="${pageInfo.pageNum }" />
                <input type="hidden" id="pageSize" name="pageSize" value="${pageInfo.pageSize }" />
                <input type="text" name="productTypeName"  value="${bean.productTypeName }" placeholder=" 请输入你要查询的类型名称" style="width:250px" class="input-text">
                <button name="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
            </form>
        </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"><span class="l"> <a class="btn btn-primary radius"
                                                                onclick="productTypeEdit('新增产品类型','/productType/getProductType','770','400')"
                                                                href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增产品类型</a></span>
    </div>
    <div class="mt-20 portfolio-content">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th>父级名称</th>
                <th>产品类型名称</th>
                <th>图标</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${pageInfo.list}" var="item" varStatus="index">
                <tr class="text-c">
                    <td>
                        <c:if test="${item.parentId==0}" >
                            无父级
                        </c:if>
                        <c:forEach items="${ParentType}" var="ParentType">
                            ${ParentType.tid==item.parentId?ParentType.productTypeName:""}
                        </c:forEach>
                    </td>
                    <td>${item.productTypeName}</td>
                    <td>
                        <div class="portfoliobox">
                            <div class="picbox">
                                <a href="${picPath}/${item.ico}" data-lightbox="gallery">
                                    <img src="${picPath}/${item.ico}" width="100" height="100">
                                </a>
                            </div>
                        </div>
                    </td>
                    <td class="td-manage">
                        <a style="text-decoration:none" class="ml-5"
                           onClick="productTypeEdit('产品类型编辑','/productType/getProductType?tid=${item.tid}','770','400')"
                           href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="ui-page tr mt10" style="float: right;margin-top: 10px;margin-bottom: 10px"></div>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/static/lib/lightbox2/2.8.1/js/lightbox.min.js"></script>
<script type="text/javascript" src="/static/js/activity/getActivityList.js"></script>
<%@ include file="/common/include-footer.jsp" %>
</body>
</html>
